package com.gengral.bussiness.sys.user.mapper;

import com.gengral.bussiness.sys.user.entity.User;
import org.apache.ibatis.annotations.Param;
import com.github.pagehelper.Page;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sht
 * @since 2020-04-14
 */
@Mapper
@Repository
public interface UserMapper extends BaseMapper<User> {

   /**
	* 根据id查询User
	*/
	User getUserById(@Param(value = "id") Long id) throws Exception;

	/**
	* 查询User列表
	*/
	List<User> listUser(User user) throws Exception;

	/**
	* 分页查询User列表
	*/
	Page<User> pageUser(User user) throws Exception;

	/**
	* 新增User
	*/
	Integer addUser(User user) throws Exception;

	/**
	* 更新User
	*/
	Integer updateUser(User user) throws Exception;

	/**
	* 根据id物理删除User
	*/
	Integer deleteUserById(@Param(value = "id") Long id)	throws Exception;

	/**
	* 根据id逻辑删除User
	*/
	Integer removeUserById(@Param(value = "id") Long id)	throws Exception;
}
